#if !defined(AFX_MTEXTSTYLEBOX_H__961089C6_4371_11D3_BD8F_0060089608A4__INCLUDED_)
#define AFX_MTEXTSTYLEBOX_H__961089C6_4371_11D3_BD8F_0060089608A4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MTextStyleBox.h : header file


class dmDbDatabase;

class CTextStyleTableInfo
{
public:
	// Construction/Destruction
	CTextStyleTableInfo();
	virtual ~CTextStyleTableInfo();

	// Attributes
	inline dmDbDatabase * GetDrawing(void);
	inline void			SetDrawing(dmDbDatabase *drawing);

	inline DM_REAL		GetHeight(void);
	inline void			SetHeight(const DM_REAL value);

	inline DM_REAL		GetWidth(void);
	inline void			SetWidth(const DM_REAL value);

	inline DM_REAL		GetObliqueAngle(void);
	inline void			SetObliqueAngle(const DM_REAL value);

	inline BOOL			GetBackwards(void);
	inline void			SetBackwards(BOOL value);

	inline BOOL			GetUpsideDown(void);
	inline void			SetUpsideDown(BOOL value);

	inline BOOL			GetVertically(void);
	inline void			SetVertically(BOOL value);

	inline CString&		GetStyleName(void);
	inline void			SetStyleName(const CString& value);

	inline CString		GetFontFilename(const bool getFullPath);
	inline void			SetFontFilename(const CString& value);

	inline CString&		GetFontFamily(void);
	inline void			SetFontFamily(const CString& value);

	inline long			GetFontStyle(void);
	inline void			SetFontStyle(const long value);

	inline bool			GetHasTrueTypeFont(void);
	inline void			SetHasTrueTypeFont(const bool value);

private:
	// Data members
	dmDbDatabase *m_dbDataBase;

	DM_REAL	m_height;
	DM_REAL	m_width;
	DM_REAL	m_obliqueAngle;

	BOOL		m_backwards;
	BOOL		m_upsideDown;
	BOOL		m_vertically;

	CString		m_styleName;
	CString		m_fontFilename;
	CString		m_fontFamily;

	long		m_fontStyle;

	bool		m_hasTrueTypeFont;
};



/////////////////////////////////// INLINE FUNCTIONS ///////////////////////////////////
//

inline dmDbDatabase * CTextStyleTableInfo::GetDrawing(
	void)
{
	return m_dbDataBase;
}

inline void CTextStyleTableInfo::SetDrawing(
	dmDbDatabase *drawing)
{
	m_dbDataBase = drawing;
}

inline DM_REAL	CTextStyleTableInfo::GetHeight(
	void)
{
	return m_height;
}

inline void CTextStyleTableInfo::SetHeight(
	const DM_REAL value)
{
	m_height = value;
}

inline DM_REAL	CTextStyleTableInfo::GetWidth(
	void)
{
	return m_width;
}

inline void CTextStyleTableInfo::SetWidth(
	const DM_REAL value)
{
	m_width = value;
}

inline DM_REAL	CTextStyleTableInfo::GetObliqueAngle(
	void)
{
	return m_obliqueAngle;
}

inline void CTextStyleTableInfo::SetObliqueAngle(
	const DM_REAL value)
{
	m_obliqueAngle = value;
}

inline BOOL CTextStyleTableInfo::GetBackwards(
	void)
{
	return m_backwards;
}

inline void CTextStyleTableInfo::SetBackwards(
	BOOL value)
{
	m_backwards = value;
}

inline BOOL CTextStyleTableInfo::GetUpsideDown(
	void)
{
	return m_upsideDown;
}

inline void CTextStyleTableInfo::SetUpsideDown(
	BOOL value)
{
	m_upsideDown = value;
}

inline BOOL CTextStyleTableInfo::GetVertically(
	void)
{
	return m_vertically;
}

inline void CTextStyleTableInfo::SetVertically(
	BOOL value)
{
	m_vertically = value;
}

inline CString&	CTextStyleTableInfo::GetStyleName(
	void)
{
	return m_styleName;
}

inline void CTextStyleTableInfo::SetStyleName(
	const CString& value)
{
	m_styleName = value;
}

inline CString CTextStyleTableInfo::GetFontFilename(
	const bool getFullPath)
{
	if (getFullPath)
		return m_fontFilename;
	else
	{
		return (strrchr(m_fontFilename, '\\')) ? strrchr(m_fontFilename, '\\') + 1 : m_fontFilename;
	}
}

inline void CTextStyleTableInfo::SetFontFilename(
	const CString& value)
{	
	m_fontFilename = value;
}

inline CString&	CTextStyleTableInfo::GetFontFamily(
	void)
{
	return m_fontFamily;
}

inline void CTextStyleTableInfo::SetFontFamily(
	const CString& value)
{
	m_fontFamily = value;
}

inline long CTextStyleTableInfo::GetFontStyle(
	void)
{
	return m_fontStyle;
}

inline void CTextStyleTableInfo::SetFontStyle(
	const long value)
{
	m_fontStyle = value;
}

inline bool CTextStyleTableInfo::GetHasTrueTypeFont(
	void)
{
	return m_hasTrueTypeFont;
}

inline void CTextStyleTableInfo::SetHasTrueTypeFont(
	const bool value)
{
	m_hasTrueTypeFont = value;
}



/////////////////////////////////////////////////////////////////////////////
// MTextStyleBox window

class MTextStyleBox : public CComboBox
{
// Construction
public:
	MTextStyleBox();

// Attributes
public:
	CTextStyleTableInfo		m_tableInfo;

// Operations
public:
	void FillStyleComboBox();
	void GetTextStyle();	

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(MTextStyleBox)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~MTextStyleBox();

	// Generated message map functions
protected:
	//{{AFX_MSG(MTextStyleBox)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MTEXTSTYLEBOX_H__961089C6_4371_11D3_BD8F_0060089608A4__INCLUDED_)
